package com.example.websocket_service;


import cn.hutool.core.date.DateTime;
import com.example.websocket_service.entity.FileInfo;
import org.apache.commons.lang.time.DateUtils;
import org.joda.time.LocalDate;

import java.io.File;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;

public class test {
//    public static void main(String[] args) throws ParseException {
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//        Date parse = sdf.parse("2022-05-24 13:50:33");
//        Date afterDay = getAfterDay(parse,7);
//        System.out.println(sdf.format(new Date()));
//        System.out.println(sdf.format(afterDay));
//        if (sdf.format(new Date()).equals(sdf.format(afterDay))) {
//            System.out.println(true);
//        }
//    }
//    private static Date getAfterDay(Date date, int diff) {
//        Calendar calendar = Calendar.getInstance();
//        calendar.setTime(date == null ? new Date() : date);
//        calendar.add(Calendar.DATE, diff);
//        return calendar.getTime();
//    }
public static void main(String[] args) {
//    Date date = DateUtils.addDays(new Date(), -7);
//    System.out.println(date);
    System.out.println(new Date());
    System.out.println(new Date().getTime());
    System.out.println(new DateTime());
    System.out.println(new LocalDate());
}
}
